


<!DOCTYPE html>
<html lang="en">

<head>
    
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>json,json格式化,json还原,在线json,在线json验证解析,格式化,校验,视图在线工具-postjson</title>
    <meta name="robots" content="all" />
    <meta name="keywords" content="在线,json,json解析,json格式化,json验证,json校验,json格式化后还原原始串,json还原,json tool,online json,json视图,可视化" />
    <meta name="description" content="在线,json,json解析,json格式化,json验证,json校验,json格式化后还原原始串,json还原,json tool,online json,json视图,可视化" />
    <link rel="shortcut icon" href="/static/coolaf/img/favicon.ico">
    
    
    <script src="/static/coolaf/js/ie-emulation-modes-warning.js"></script>

    
    
    
    <link rel="stylesheet" href="/static/coolaf/bootstrap/css/bootstrap.min.css">
    <script src="/static/coolaf/js/jquery.min.js"></script>
    <link rel="stylesheet" href="/static/coolaf/css/offcanvas.css">
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

</head>
<script>
        var showToast = function (msg,option) {
        outTime = 3000;
        if (option&&option.outTime) {
            outTime = option.outTime;
        }
        if (!$(".showtoastresult").html()) {
            html = "<div class='showtoastresult' style='min-width: 50px;width: auto;padding: 10px 20px;font-size: 14px;font-weight: bold;background: rgba(7, 17, 27, 0.66);border-radius: 6px;color: rgb(255, 255, 255);top: 50%;z-index: 1000001;transform: translate3d(-50%, -50%, 0px);position: fixed;top: 50%;left: 50%;-webkit-transform: translate(-50%, -50%);-moz-transform: translate(-50%, -50%);-ms-transform: translate(-50%, -50%);-o-transform: translate(-50%, -50%);transform: translate(-50%, -50%);'></div>";
            $(document.body).append(html);
        }
        $(".showtoastresult").html(msg);    
        $(".showtoastresult").fadeIn("slow").fadeOut(3000);
        return false;
    }
</script>
<style>
    .navbar-brand,.navbar-nav>li>a{
        color:#fdfdfd!important;
    }
    .navbar-nav>li>a:hover{
        color:#ff8839!important;
    }
</style>
<body >
    

	<script>
	$("#black1").click(function(){
		var s = $(this).html();
		if (s=="夜间模式") {
			$('body').css("background-color","black");
			$('body').css("opacity","0.7")
			$('body').css("-moz-opacity","0.7")
			$('body').css("filter","alpha(opacity=50)")
			$(this).html('白天模式');
		}else{
			$('body').css("background-color","");
			$('body').css("opacity","")
			$('body').css("-moz-opacity","")
			$('body').css("filter","")
			$(this).html('夜间模式');
		}
	});
	</script>
    
    <div class="container">

        <div class="row row-offcanvas row-offcanvas-right main-contain">
            
            <div class="col-xs-12 col-sm-9">
                
                
              

<link href="/static/coolaf/css/jquery-linedtextarea.css" type="text/css" rel="stylesheet">
<link href="/static/coolaf/css/json.css" type="text/css" rel="stylesheet">
<h3>json 解析格式化</h3>

<ul class="nav nav-tabs" role="tablist" >
  <li role="presentation" class="active" id='rspdis'><a href="/tool/json">json格式化1</a></li>
  <li role="presentation" id='headdis' ><a href="/tool/jsonedit">json编辑</a></li>
<span style='float:right;margin:20px 10px 0px 0px'>  </span>
</ul>

<div style="width:808px">
    <div>
        <form id="JSONValidate" method="post" action="." name="JSONValidate">
            <input type="hidden" id="reformat" value="1">
            <input type="hidden" id="compress" value="0">

            <textarea id="json_input" name="json_input" class="json_input" rows="30" cols="60" spellcheck="false" placeholder="请输入要格式化的json"
                wrap="off"></textarea>
            <div class="validateButtons clear">
                <div class="left">
                    <button name="validate" id="validate" class="btn btn-primary">验证</button>
                    <button name="changemin" id="changemin" class="btn btn-primary">还原原始串</button>
                   
                    <button class="btn btn-primary" onclick="JavaScript:$('#json_input').val('');$('#json_input').focus();return false;">清空</button>
                    <button class="btn btn-primary" id='exam'>示例</button>
                </div>
            </div>
        </form>
    </div>
    <div style='padding-top:20px'>
        <pre id="results" class="error" style='color:#FF5151'> </pre>
    </div>
    <div style='padding-top:20px'>
        <pre class="error" style='line-height:25px'> 
json格式说明：

	1、对象是一个无序的“‘名称/值’对”集合。
	（1）一个对象以“{”（左括号）开始，“}”（右括号）结束。
        （2）每个“名称”后跟一个“:”（冒号）；
        （3）“‘名称/值’ 对”之间使用“,”（逗号）分隔
		
	2、数组是值（value）的有序集合。
	（1）一个数组以“[”（左中括号）开始，“]”（右中括号）结束。
        （2）值之间使用“,”（逗号）分隔。
			例：
				{
				"学生": [
					{"姓名":"小明","年龄":23},
					{"姓名":"大憨","年龄":24}
				]
				}
		说明：此Json对象包括了一个学生数组，而学生数组中的值又是两个Json对象。
		
	3、值（value）可以是双引号括起来的字符串（string）、数值(number)、true、
	   false、 null、对象（object）或者数组（array）
	4、字符串（string）是由双引号包围的任意数量Unicode字符的集合，使用反斜线
	   转义。一个字符（character）即一个单独的字符串（character string）
			   </pre>
    </div>
</div>
<script src="/static/coolaf/js/jquery-linedtextarea.js" type="text/javascript"></script>
<script type="text/javascript" src="/static/coolaf/js/jsl.parser.js"></script>
<script type="text/javascript" src="/static/coolaf/js/jsl.format.js"></script>
<script type="text/javascript" src="/static/coolaf/js/jsl.interactions.js"></script>
<script src="/static/coolaf/js/vkbeautify.min.js"></script>
<script src="/static/coolaf/js/clipboard.min.js"></script>
<script>
    var clipborad = new ClipboardJS("#clipjson");
	clipborad.on('success', function (e) {
		showToast("复制成功");
        e.clearSelection();
        return false;
	});
	clipborad.on('error', function (e) {
		showToast("复制失败");
        e.clearSelection();
        return false;
	});
    $(document).ready(function () {
        $("#exam").click(function () {
            $('#json_input').val('{"data":[],"msg":"\u7b7e\u540d\u9519\u8bef","code":-1}');
            return false;
        });

        $("#changemin").click(function () {
            var json1 = $("#json_input").val();

            if (json1 == "") {
                return false;
            }

            mjson = vkbeautify.jsonmin(json1)
            if (!mjson) {
                alert('解析失败，请确认格式正确');
                return false;
            }
            console.log(mjson);
            $("#json_input").val(mjson);
            return false;
        });
    });

</script> 
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?2db240112a8dbb4d6a2869381e5fbfed";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>



 </div>

    </div>
</div>


  <script src="/static/coolaf/bootstrap/js/bootstrap.min.js"></script>
  <script src="/static/coolaf/js/offcanvas.js"></script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?18f18be6e58f13d87192835c8c15fdca";
  var s = document.getElementsByTagName("script")[0];
  s.parentNode.insertBefore(hm, s);
})();
</script>
<script>
try{
　　top.location.hostname;
　　if (top.location.hostname != window.location.hostname) {
　　　　top.location.href =window.location.href;
　　}
}
catch(e){
　　top.location.href = window.location.href;
}
</script>
<script>
$.ajax({
	  url:"/side",
	  type:"GET",
	  dataType:"jsonp",
	  success:function(data){
		
		$(".sideclass").each(function(){
			
		});
	  }
     });
</script>
<a href='/m'>m</a>

<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
<script>
$(document).ready(function () {
		$("#newpayup").click(function () {
			$("#payup").show();
		});
		$("#payup").click(function () {
			$(this).hide();
		});
});
</script>
<style>
		.payup {
			display: none;
			position: fixed;
			top: 0px;
			left: 0px;
			width: 100%;
			height: 100%;
			background: rgba(0, 0, 0, 0.6);
			z-index: 6666
		}

		.postpay {
			position: relative;
			float: right;
		}

		.postpay button {
			color: yellow;
			width: 68px;
			height: 50px;
			word-wrap: break-word;
			background-color: hsl(340, 100%, 75%);
			box-shadow: inset rgba(255, 254, 255, 0.6) 0 0.3em .3em, inset rgba(0, 0, 0, 0.15) 0 -0.1em .3em, hsl(340, 70%, 50%) 0 .1em 3px, hsl(340, 80%, 40%) 0 .3em 1px, rgba(0, 0, 0, 0.2) 0 .5em 5px;
			border: none;
			padding-right: 1.2em;
			padding-left: 0.8em;
			border-radius: 3em 1em / 5em 1em;
		}

		.payupimg {
			width: 680px;
			height: 390px;
			margin: 0 auto;
			position: relative;
			top: 256px;
			z-index: 9999;
			background: white;
		}

		.payup img {
			float: left;
			width: 280px;
			height: 280px;
			margin:30px 30px 30px 30px;
		}

		.imgtext {
			width: 330px;
			display: inline-block;
			text-align: center;
			font-size: 20px;
			font-weight: blod;
		}
	</style>
	<div class='payup' id='payup'>
		<span></span>
		<div class='payupimg'>
			<img src="/static/coolaf/img/zfb.png" >
			<img src="/static/coolaf/img/wx.png" >
			<div>
				<span class='imgtext'>支付宝</span>
				<span class='imgtext'>微信</span>
			</div>
		</div>
	</div>
</body>
</html>
